package com.auxgroup.smarthome;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: laiqiuhua.
 * @Date: 2017/9/19 16:46.
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@EnableAsync
public class SnotiApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(SnotiApplication.class);
        springApplication.addListeners(new ApplicationEventListener());
        springApplication.run(args);
    }

    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }



}
